package com.ruoyi.bussiness.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.bussiness.mapper.MgtComplaintMapper;
import com.ruoyi.bussiness.domain.MgtComplaint;
import com.ruoyi.bussiness.service.IMgtComplaintService;
import com.ruoyi.common.core.text.Convert;

/**
 * 投诉Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-11-12
 */
@Service
public class MgtComplaintServiceImpl implements IMgtComplaintService 
{
    @Autowired
    private MgtComplaintMapper mgtComplaintMapper;

    /**
     * 查询投诉
     * 
     * @param id 投诉主键
     * @return 投诉
     */
    @Override
    public MgtComplaint selectMgtComplaintById(Long id)
    {
        return mgtComplaintMapper.selectMgtComplaintById(id);
    }

    /**
     * 查询投诉列表
     * 
     * @param mgtComplaint 投诉
     * @return 投诉
     */
    @Override
    public List<MgtComplaint> selectMgtComplaintList(MgtComplaint mgtComplaint)
    {
        return mgtComplaintMapper.selectMgtComplaintList(mgtComplaint);
    }

    /**
     * 新增投诉
     * 
     * @param mgtComplaint 投诉
     * @return 结果
     */
    @Override
    public int insertMgtComplaint(MgtComplaint mgtComplaint)
    {
        return mgtComplaintMapper.insertMgtComplaint(mgtComplaint);
    }

    /**
     * 修改投诉
     * 
     * @param mgtComplaint 投诉
     * @return 结果
     */
    @Override
    public int updateMgtComplaint(MgtComplaint mgtComplaint)
    {
        return mgtComplaintMapper.updateMgtComplaint(mgtComplaint);
    }

    /**
     * 批量删除投诉
     * 
     * @param ids 需要删除的投诉主键
     * @return 结果
     */
    @Override
    public int deleteMgtComplaintByIds(String ids)
    {
        return mgtComplaintMapper.deleteMgtComplaintByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除投诉信息
     * 
     * @param id 投诉主键
     * @return 结果
     */
    @Override
    public int deleteMgtComplaintById(Long id)
    {
        return mgtComplaintMapper.deleteMgtComplaintById(id);
    }
}
